import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  {
    name: 'home',
    path: '/',
    component: () => import('@/layout/index.vue'),
    redirect: '/WallMessage/0',
    children: [
      {
        name: 'WallMessage',
        path: '/WallMessage/:id',
        component: () => import('@/views/WallMessage/index.vue')
      }
    ]
  },
  {
    name: 'register',
    path: '/register',
    component: () => import('@/views/Register/index.vue')
  }
]

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes
})

export default router
